/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package org.ipo.mm.web.util;

import java.io.UnsupportedEncodingException;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.ipo.mm.web.actions.CityAction;

/**
 *
 * @author makcro
 */
public class UTFEncoder {

    public static String encode(String iso88591String){

        String utfString = null;

        try {
            if(iso88591String != null){
                utfString = new String(iso88591String.getBytes(ConstantManager.ENCODING_ISO88592), ConstantManager.ENCODING_UTF8);
            }
            
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(CityAction.class.getName()).log(Level.SEVERE, null, ex);
        }
        return utfString;
    }
    
}
